package com.nuanshui.heatedloan.msgcenter.model;

/**
 * 消息业务类型
 */
public enum MsgBizType {

	//文章
	ARTICLE(500, "article", "推送文章"),

	//系统
	SYSTEM(600, "system", "管理员推送"),

	//审核消息
	AUDIT(610,"audit","审核消息"),

	//还款消息
	REPAYMENT(620,"repayment","还款消息"),
	;

	private Integer type;
	private String typeName;
	private String des;

	MsgBizType(Integer type, String typeName, String des){
		this.type = type;
		this.typeName = typeName;
		this.des = des;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	public String getDes() {
		return des;
	}

	public void setDes(String des) {
		this.des = des;
	}

	public static MsgBizType getBizType(int bizType)
	{
		MsgBizType item=null;

		MsgBizType[] bizTypes=MsgBizType.values();

		for (MsgBizType type: bizTypes) {
			if (bizType == type.getType())
			{
				item=type;
				break;
			}
		}
		return item;
	}
}
